package com.lfd.springasync.config;

import org.springframework.aop.interceptor.AsyncUncaughtExceptionHandler;
import org.springframework.context.annotation.Configuration;
import org.springframework.scheduling.annotation.AsyncConfigurer;
import org.springframework.scheduling.annotation.EnableAsync;
import org.springframework.stereotype.Component;

/**
 * @项目名： spring-emq
 * @包名： com.lfd.springasync.config
 * @文件名: AsyncExceptionConfig
 * @创建者: liufudong@szyh-smart.com
 * @创建时间: 2024/10/13 21:35
 * @描述：
 */

@Configuration
@EnableAsync
public class AsyncExceptionConfig implements AsyncConfigurer {

    @Override
    public AsyncUncaughtExceptionHandler getAsyncUncaughtExceptionHandler() {
        return new MyAsyncExceptionHandler();
    }
}
